#include <cstdio>
#include <iostream>

static int s_iGlobalStatic;
void Foo()
{
	static int s_iLocalStatic = 1;
	printf("Foo: called local %d\n",s_iLocalStatic++);
	printf("Foo: called global %d\n",s_iGlobalStatic++);
}
int main()
{
	int localVar = 1;
	printf("Main: %d\n",
	s_iGlobalStatic);
	Foo();
	Foo();
	Foo();
	system("pause");
	return 1;
}